﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class OrderCommentInfoConfig : EntityTypeConfiguration<OrderCommentInfo>
    {
        public OrderCommentInfoConfig()
        {
            ToTable("Himall_OrderComments");
            Property(item => item.ShopName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.UserName).HasColumnType("varchar").HasMaxLength(100);
            HasRequired(x => x.OrderInfo).WithMany(x => x.OrderCommentInfo).HasForeignKey(x => x.OrderId);
        }
    }
}
